package com.literature.search.file.task.executor;


/**
 * @Author: DangKong
 * @Date: 2023/3/2 21:01
 * @Description:
 */

public class TaskExecutorFactory {

    private TaskExecutorFactory() {

    }

    static TaskExecutor taskExecutor = null;

    public static TaskExecutor getTaskExecutor( ) {
        if (null != taskExecutor) {
            return taskExecutor;
        }
        return createTaskExecutor();
    }

    /**
     * 创建任务执行器
     * @return 任务执行器
     */
    private static TaskExecutor createTaskExecutor( ) {
        return new TaskExecutor();
    }
}
